import 'package:flutter/material.dart';
import '../models/list_item.dart';

class ListItemCardNoProvider extends StatelessWidget {
  final ListItem item;
  final int index;
  final VoidCallback? onTap;

  const ListItemCardNoProvider({
    Key? key,
    required this.item,
    required this.index,
    this.onTap,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Card(
      margin: const EdgeInsets.symmetric(horizontal: 16,vertical: 4),
      elevation: 1,
      child: ListTile(
        contentPadding: const EdgeInsets.symmetric(horizontal: 16,vertical: 8),
        leading: Container(
          padding: const EdgeInsets.all(12),
          decoration: BoxDecoration(
            color: item.color.withOpacity(0.15),
            shape: BoxShape.circle,
          ),
          child: Icon(item.icon,size: 28,color: item.color),
        ),
        title: Text(
          item.title,
          style: const TextStyle(fontSize: 18,fontWeight: FontWeight.w600),
        ),
        subtitle: Text("this is the description: ${item.title}"),
        trailing: const Icon(Icons.chevron_right,color: Colors.grey),
        onTap: onTap,
      ),
    );
  }


}
